package com.yanmaohu.nikita.data.expression;

import com.yanmaohu.nikita.data.operator.BooleanOperator;

/**
 * @author Bright Lee
 */
public final class BooleanExpression extends Expression {

    private final BooleanOperator booleanOperator;
    private final Expression a;
    private final Expression b;

    public BooleanExpression(int beginIndex, int endIndex, BooleanOperator booleanOperator, Expression a, Expression b) {
        super(beginIndex, endIndex);
        this.booleanOperator = booleanOperator;
        this.a = a;
        this.b = b;
    }

    public BooleanExpression(int beginIndex, int endIndex, BooleanOperator booleanOperator, Expression a) {
        this(beginIndex, endIndex, booleanOperator, a, null);
    }

    public BooleanOperator getBooleanOperator() {
        return booleanOperator;
    }

    public Expression getA() {
        return a;
    }

    public Expression getB() {
        return b;
    }

}
